package service;

import java.util.List;
import java.util.Map;

import util.DataBaseUtils;

public class CategoryService {
	
	public void addCategory(String id,String name){
		DataBaseUtils.update("insert into t_category values (?,?)", id,name);
	}
	
	public List<Map<String,Object>> list(){
		return DataBaseUtils.queryForList("select * from t_category ");
	}
	
	public void deleteCategory(String id){
		DataBaseUtils.update("delete from t_category where category_id = ?", id);
	}
}
